package com.example.modulethree.activity

import android.os.Bundle
import android.widget.TextView
import com.example.baselibrary.activity.BaseNewActivity
import com.example.baselibrary.bean.PublicViewHolder
import com.example.baselibrary.util.BaseResourceUtil
import com.example.modulethree.R

/**
 * Created by sun.li on 2018/6/25.
 *
 * @author sun.li
 */

open class KotlinTestActivity : BaseNewActivity(){

    private val viewHolder : ViewHolder = ViewHolder()

    override fun initLayoutRes(): Int {
//        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
        return R.layout.activity_kotlin_test_layout
    }

    override fun initViewHolderObject(): PublicViewHolder {
//        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
        return viewHolder
    }

    override fun baseOnClick(viewId: Int) {
//        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
        if(BaseResourceUtil.whetherResourceIDSame(viewId,R.id.tv_kta_text)){
            finish()
        }
    }

    override fun initView(bundle: Bundle?) {
        super.initView(bundle)
        viewHolder.tv_kta_text?.text = "KotlinTextHint"
    }

    open class ViewHolder : PublicViewHolder(){

        @JvmField
        var tv_kta_text : TextView? = null
    }

}
